package work.timejay.user.service.mqs.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import work.timejay.common.SuperServiceImpl;
import work.timejay.user.entity.mqs.MqLog;
import work.timejay.user.mapper.mqs.MqLogMapper;
import work.timejay.user.service.mqs.MqLogService;
import work.timejay.user.vo.UserSend;

/**
 * <p>
 * mq事务幂等表 服务实现类
 * </p>
 *
 * @author wwj
 * @since 2022-01-03
 */
@Service
public class MqLogServiceImpl extends SuperServiceImpl<MqLogMapper, MqLog> implements MqLogService {
    @Transactional(rollbackFor = Exception.class)
    @Override
    public void addRecord(UserSend userSend) {
        this.getBaseMapper().insert(new MqLog(userSend.getTxNo()));
    }
}
